﻿using System;
using System.Data;
using System.Text;
using System.Data.SqlClient;
using Gift.DBUtility;//请先添加引用
using Gift.Model;
namespace Gift.DAL
{
   public class DALPageList
    {
        // Methods
        public DataTable GetPageList(PageList pageList)
        {
            DataTable table = new DataTable();
            try
            {
                SqlParameter[] commandParameters = new SqlParameter[] { new SqlParameter("@tblName", pageList.TblName), new SqlParameter("@strGetFields", pageList.StrGetFields), new SqlParameter("@fldName", pageList.FldName), new SqlParameter("@pageSize", pageList.PageSize), new SqlParameter("@pageIndex", pageList.PageIndex), new SqlParameter("@doCount", pageList.DoCount), new SqlParameter("@orderType", pageList.OrderType), new SqlParameter("@strWhere", pageList.StrWhere) };
               
               return DbHelperSQL.RunProcedure("pro_GetPageList", commandParameters,"PageList").Tables[0];
            }
            catch
            {
                return table;
            }
        }

    }
}
